/*    */ package com.behavior.iterator;
/*    */ 
/*    */ public class ConcreteIterator
/*    */   implements Iterator
/*    */ {
/*    */   private Aggregate aggregate;
/*  6 */   private int current = 0;
/*    */ 
/*    */   public ConcreteIterator(Aggregate aggregate) {
/*  9 */     this.aggregate = aggregate;
/*    */   }
/*    */ 
/*    */   public Object first()
/*    */   {
/* 14 */     return this.aggregate.get(0);
/*    */   }
/*    */ 
/*    */   public Object next()
/*    */   {
/* 19 */     if (this.current < this.aggregate.length()) {
/* 20 */       return this.aggregate.get(this.current++);
/*    */     }
/* 22 */     return null;
/*    */   }
/*    */ 
/*    */   public boolean isDone()
/*    */   {
/* 27 */     return this.current == this.aggregate.length();
/*    */   }
/*    */ 
/*    */   public Object currentObject()
/*    */   {
/* 32 */     return this.aggregate.get(this.current);
/*    */   }
/*    */ }

/* Location:           C:\Users\lenovo\Desktop\DesignMode.jar
 * Qualified Name:     com.behavior.iterator.ConcreteIterator
 * JD-Core Version:    0.6.2
 */